let mind = document.querySelector('.mind')
let span = document.querySelector('span')
let foot = document.querySelector('.footer')
let pin = document.querySelector('.pin')
function getQueryString() {
    let url = location.href
    let reg = /(?<=\?).*/
    let r = url.match(reg)
    let rm = r[0]
    console.log(rm)
    fetch('http://chst.vip:1234/api/getproduct?' + rm)
        .then(body => body.json())
        .then(res => {
            console.log(res)
            let reg = res.result[0]
            console.log(reg.productImg)
            let regExp = /(?<=imgurl=)[^'"]*/
            let result = reg.productImg.match(regExp)
            console.log(result)
            let img = reg.productImg
            console.log(img)
            let el = ''
            el = `<div>${img}</div>
        <div><p>${reg.productName}<p></div>
        <div>${reg.bjShop}</div>
        `
            mind.innerHTML = el
        })
}
getQueryString()